using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BaHuan.Common;
using BaHuan.Entities;
using BaHuan.DataLayer;
/*
 * There are many processes that handle the flows of data
 * we call them business logic of a program.
 * For each of business logic process we create a class 
 * that handle for that process
 * 
 * */
namespace BaHuan.BusinessLayer
{
	
	public class CTPhieuXuatHangManagement
	{
	
		public ResultObj SaveNewCTPhieuXuatHang(CTPhieuXuatHang ctphieuxuathang)
        		{
			ResultObj result = new ResultObj();
			ctphieuxuathang.Id = -1;
			CTPhieuXuatHangDAO ctphieuxuathangDAO = new CTPhieuXuatHangDAO();
			result = ctphieuxuathangDAO.SaveCTPhieuXuatHang(ctphieuxuathang);
			
			return result;
		}
		
		public ResultObj UpdateCTPhieuXuatHang(CTPhieuXuatHang ctphieuxuathang)
        		{
			ResultObj result = new ResultObj();
			CTPhieuXuatHangDAO ctphieuxuathangDAO = new CTPhieuXuatHangDAO();
			result = ctphieuxuathangDAO.SaveCTPhieuXuatHang(ctphieuxuathang);
			
			return result;
		}
		
		public ResultObj DeleteCTPhieuXuatHang(CTPhieuXuatHang ctphieuxuathang)
        		{
			ResultObj result = new ResultObj();
			CTPhieuXuatHangDAO ctphieuxuathangDAO = new CTPhieuXuatHangDAO();
			result = ctphieuxuathangDAO.DeleteCTPhieuXuatHang(ctphieuxuathang);
			
			return result;
		}
		
		public ResultObj GetAllCTPhieuXuatHang( )
        		{
			ResultObj result = new ResultObj();
			CTPhieuXuatHangDAO ctphieuxuathangDAO = new CTPhieuXuatHangDAO();
			result = ctphieuxuathangDAO.GetAllCTPhieuXuatHang();
			
			return result;
		}
		
		public ResultObj GetCTPhieuXuatHangById(CTPhieuXuatHang ctphieuxuathang)
        		{
			ResultObj result = new ResultObj();
			CTPhieuXuatHangDAO ctphieuxuathangDAO = new CTPhieuXuatHangDAO();
			result = ctphieuxuathangDAO.GetAllCTPhieuXuatHangByID(ctphieuxuathang);
			
			return result;
		}
					
	}
}
